home *** CD-ROM | disk | FTP | other *** search
-
- Free Information Xchange presents:
-
- Lode Runner 2 - CD crack by Static Vengeance - Dec 28th, 1998
-
- Requirements:
- Hex Editor and Full Install
- W32Dasm if you want to follow along
-
- If you where at least 8 in the 80's you'll know the program Doug Smith & Broderbund made famous. The
- game I'll talking about is called Lode Runner. This game was one of the first real arcade type games
- developed for the computer gaming market that had good fluid animation. As far as I remember LR has been
- ported over to almost every computer platform there is. Even Sierra brought out a Win 3.1 (and later a Win95)
- version of this game. However this time GT has released the first "next step" for this game. That next step
- being adding the z factor, or bringing the game into the world of 3D. Well... there was a french pirate group
- in the late 80's that wrote what was basicly THE first 3D lode Runner knock-off for the Apple//GS
- Anyways, the graphics are nice but it's still basically the same game that came out in the 80's. Like
- that first version this latest incarnation has the same program bug. That bug being a check for the original
- disk, with this day and age a CD check. No problem, well just track it down and FiX that little bug. Hell!, I
- did it with the original Apple][ version without any fancy debuggers/disassemblers. Just my knowledge of 6502
- assembly, switches for disk access and the apple rom entry points. However this version took much less time and
- was a bit easier with the tools that are out there today.
- I started up W32Dasm and disassembled the lr2.exe and to have look at it. I did that old boring trick
- outlined in so many of my tutorials: I went up to the menu bar and selected Refs and then Data String
- References from there. Then in the pop-up box that apears I grabbed the slider bar and started scrolling down.
- I've learned if you see ref for "%a:\" or "%c:\" it's worth double clicking on and checking out. Doing so in
- this example will put is in the middle of the CD check. That check just happens to look something like this:
-
- * Referenced by a CALL at Addresses:
- |:0046A1E8 , :0046B24F , :0046B27F <-- Called three times
- |
- :0046B350 83EC38 sub esp, 00000038
- :0046B353 53 push ebx
- :0046B354 55 push ebp
- :0046B355 56 push esi
- :0046B356 57 push edi
-
- * Reference To: KERNEL32.GetLogicalDrives, Ord:00FAh <-- Commonly used in CD checks and usually
- | <-- preceeds a GetDriveTypeA call
- :0046B357 FF150C664B00 Call dword ptr [004B660C]
- :0046B35D 8B7C2454 mov edi, dword ptr [esp+54]
- :0046B361 8B5C244C mov ebx, dword ptr [esp+4C]
-
- * Reference To: KERNEL32.GetVolumeInformationA, Ord:014Fh <-- Move this call entry point into ebp
- |
- :0046B365 8B2D08664B00 mov ebp, dword ptr [004B6608]
- :0046B36B 89442410 mov dword ptr [esp+10], eax
- :0046B36F 33F6 xor esi, esi
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0046B3FE(C)
- |
- :0046B371 8B542410 mov edx, dword ptr [esp+10]
- :0046B375 B801000000 mov eax, 00000001
- :0046B37A 0FBFCE movsx ecx, si
- :0046B37D D3E0 shl eax, cl
- :0046B37F 85C2 test edx, eax
- :0046B381 7476 je 0046B3F9
- :0046B383 83C141 add ecx, 00000041
- :0046B386 8D442414 lea eax, dword ptr [esp+14]
- :0046B38A 51 push ecx
-
- * Possible StringData Ref from Data Obj ->"%c:\" <-- The ref that got us here
- |
- :0046B38B 68403B4A00 push 004A3B40
- :0046B390 50 push eax
- :0046B391 E82A71FEFF call 004524C0
- :0046B396 83C40C add esp, 0000000C
- :0046B399 8D4C2414 lea ecx, dword ptr [esp+14]
- :0046B39D 51 push ecx
-
- * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh <-- Here's the other common call to CD checks
- |
- :0046B39E FF1504664B00 Call dword ptr [004B6604]
- :0046B3A4 83F805 cmp eax, 00000005 <-- 05 = CD Rom type drive
- :0046B3A7 7550 jne 0046B3F9
- :0046B3A9 66833DF03A4A00FF cmp word ptr [004A3AF0], FFFF
- :0046B3B1 7507 jne 0046B3BA
- :0046B3B3 668935F03A4A00 mov word ptr [004A3AF0], si
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0046B3B1(C)
- |
- :0046B3BA 6A00 push 00000000
- :0046B3BC 6A00 push 00000000
- :0046B3BE 6A00 push 00000000
- :0046B3C0 6A00 push 00000000
- :0046B3C2 6A00 push 00000000
- :0046B3C4 8D542434 lea edx, dword ptr [esp+34]
- :0046B3C8 6A28 push 00000028
- :0046B3CA 8D44242C lea eax, dword ptr [esp+2C]
- :0046B3CE 52 push edx
- :0046B3CF 50 push eax
- :0046B3D0 FFD5 call ebp <-- Make the GetVolumeInformationA call
- :0046B3D2 6A00 push 00000000
- :0046B3D4 6A00 push 00000000
- :0046B3D6 6A00 push 00000000
- :0046B3D8 8D4C2420 lea ecx, dword ptr [esp+20]
- :0046B3DC 57 push edi
- :0046B3DD 51 push ecx
- :0046B3DE E8AD19FFFF call 0045CD90
- :0046B3E3 83C414 add esp, 00000014
- :0046B3E6 8D542420 lea edx, dword ptr [esp+20]
- :0046B3EA 53 push ebx <-- Push location of returned volume info
- :0046B3EB 52 push edx <-- Push location of expected info
- :0046B3EC E85F6DFEFF call 00452150 <-- Compare the two
- :0046B3F1 83C408 add esp, 00000008 <-- Adjust stack for the push edx & push ebx
- :0046B3F4 6685C0 test ax, ax <-- ax=0 then information matched
- :0046B3F7 7417 je 0046B410 <-- Need to take this jump to continue/play
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
- |:0046B381(C), :0046B3A7(C)
- |
- :0046B3F9 46 inc esi <-- Increment current drive letter
- :0046B3FA 6683FE1A cmp si, 001A <-- Did we go through all possible letters?
- :0046B3FE 0F8C6DFFFFFF jl 0046B371 <-- Jump less, means we have a few more to try
- :0046B404 660DFFFF or ax, FFFF <-- Went through them all so make ax = FFFF
- :0046B408 5F pop edi
- :0046B409 5E pop esi
- :0046B40A 5D pop ebp
- :0046B40B 5B pop ebx
- :0046B40C 83C438 add esp, 00000038
- :0046B40F C3 ret
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0046B3F7(C)
- | <-- Getting here means to LR2 the CD check passed
- :0046B410 668BC6 mov ax, si <-- Anything but zero in ax passes
- :0046B413 5F pop edi
- :0046B414 5E pop esi
- :0046B415 5D pop ebp
- :0046B416 5B pop ebx
- :0046B417 83C438 add esp, 00000038
- :0046B41A C3 ret
-
- Well with that section of code explained, let's take a look at the code that surounds the
- callers to the above section of code. First let's start with the call from 46A1E8:
-
- -- Program code --
- :0046A1DC 8D4C2408 lea ecx, dword ptr [esp+08]
- :0046A1E0 51 push ecx
- :0046A1E1 6A00 push 00000000
-
- * Possible StringData Ref from Data Obj ->"LR2" <-- Volume name of the game CD
- |
- :0046A1E3 68E43A4A00 push 004A3AE4
- :0046A1E8 E863110000 call 0046B350 <-- Check for the original CD
- :0046A1ED 83C40C add esp, 0000000C <-- Adjust stack for information that was pushed
- :0046A1F0 6685C0 test ax, ax <-- Check flag value in ax
- :0046A1F3 7C12 jl 0046A207 <-- Jump less or ax=0000-7FFF, 8000-FFFF will fail
- :0046A1F5 8D542408 lea edx, dword ptr [esp+08]
- :0046A1F9 52 push edx
- :0046A1FA 68C0F44A00 push 004AF4C0
- :0046A1FF E89C7FFEFF call 004521A0
- :0046A204 83C408 add esp, 00000008
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0046A1F3(C) <-- Getting here continues without problems
- |
- :0046A207 E8E4C1FEFF call 004563F0
- :0046A20C 5F pop edi
- :0046A20D 66B80100 mov ax, 0001
- :0046A211 5E pop esi
- :0046A212 81C4FC000000 add esp, 000000FC
- :0046A218 C3 ret
-
- To kill the CD check for this routine, just change the call to mov eax, 00000001. This way the
- jl will always be taken and the game will continue normally. Up next is the second caller:
-
- * Referenced by a CALL at Addresses:
- |:00450969 , :0046B2D6 , :0046B301 , :0046B310 , :0046B329 <-- Called 5 times
- |
- :0046B240 8B4C2408 mov ecx, dword ptr [esp+08]
- :0046B244 8B542404 mov edx, dword ptr [esp+04]
- :0046B248 8D442408 lea eax, dword ptr [esp+08]
- :0046B24C 50 push eax
- :0046B24D 51 push ecx
- :0046B24E 52 push edx <-- Push info on the stack
- :0046B24F E8FC000000 call 0046B350 <-- Do the CD check
- :0046B254 83C40C add esp, 0000000C <-- Adjust stack for info pushed
- :0046B257 33C9 xor ecx, ecx <-- Zero out ecx
- :0046B259 663DFFFF cmp ax, FFFF <-- Compare agianst known fail value
- :0046B25D 0F95C1 setne cl <-- Set not equal in lower 8 bits of C register
- :0046B260 668BC1 mov ax, cx <-- Move the new flag value from cx into ax
- :0046B263 C3 ret <-- Return to the caller
-
- Once again, changing the call to the CD check to mov eax, 00000001 kills the CD check for this
- section of code. On the the third and last section to check out:
-
- * Referenced by a CALL at Address:
- |:0045427D
- |
- :0046B270 8B4C2408 mov ecx, dword ptr [esp+08]
- :0046B274 8B542404 mov edx, dword ptr [esp+04]
- :0046B278 8D442408 lea eax, dword ptr [esp+08]
- :0046B27C 50 push eax
- :0046B27D 51 push ecx
- :0046B27E 52 push edx <-- Push info on the stack
- :0046B27F E8CC000000 call 0046B350 <-- Do the CD check
- :0046B284 83C40C add esp, 0000000C <-- Adjust stack for info pushed
- :0046B287 663DFFFF cmp ax, FFFF <-- Compare agianst known fail value
- :0046B28B 7414 je 0046B2A1 <-- Take this jump if CD check failed
- :0046B28D 8B0DF03A4A00 mov ecx, dword ptr [004A3AF0]
- :0046B293 2BC1 sub eax, ecx
- :0046B295 8B4C240C mov ecx, dword ptr [esp+0C]
- :0046B299 668901 mov word ptr [ecx], ax
- :0046B29C 66B80100 mov ax, 0001 <-- Means the CD check passed from this section
- :0046B2A0 C3 ret <-- Return to caller
-
- * Referenced by a (U)nconditional or (C)onditional Jump at Address:
- |:0046B28B(C)
- |
- :0046B2A1 8B54240C mov edx, dword ptr [esp+0C]
- :0046B2A5 6633C0 xor ax, ax <-- Set up for failed CD check
- :0046B2A8 66C702FFFF mov word ptr [edx], FFFF
- :0046B2AD C3 ret <-- Return to caller
-
- Like the last two before this section, changing the call to mov eax, 00000001 will efectively kill the
- CD check. Making all three edits to the exe will result in a version that can be played off the hard drive
- without the need for the original CD to be on-line. There is also an updated version 1.1 on the net you can
- download. The CD check is the same with there being one additional caller. So you'll have to make four edits
- for that one istead of three. The old step by step method would be:
-
- 1. Install the game
- 2. Make the following edit based on your version:
-
- For version 1.0 off the CD edit lr2.exe
- =============================================
- Search for: E8 63 11 00 00 at offset 432.592
- Change to : B8 01 00 00 00
-
- Search for: E8 FC 00 00 00 at offset 435,791
- Change to : B8 01 00 00 00
-
- Search for: E8 CC 00 00 00 at offset 435,839
- Change to : B8 01 00 00 00
-
-
- For version 1.1 edit lr2.exe off the net
- =============================================
- Search for: E8 26 F7 02 00 at offset 551,610
- Change to : B8 01 00 00 00
-
- Search for: E8 EE 44 01 00 at offset 662,770
- Change to : B8 01 00 00 00
-
- Search for: E8 DF 00 00 00 at offset 745,729
- Change to : B8 01 00 00 00
-
- Search for: E8 B2 00 00 00 at offset 747,774
- Change to : B8 01 00 00 00
-
- 3. Enjoy the game.
-
- Another game has been FiX'ed and freed of it's need for the CD to be on line.
-
- Static Vengeance
-